import request from '@/utils/request'

export default {

  //添加章节
  addVideo(videoInfo){
    return request({
      url: '/eduService/video/addVideo',
      method: 'post',
      data: videoInfo
    })
  },

  //通过id查询章节
  getVideoById(videoId){
    return request({
      url: '/eduService/video/getVideoInfoById/'+videoId,
      method: 'get'
    })
  },
  //更新章节信息
  updateVideo(videoInfo){
    return request({
      url: '/eduService/video/updateVideo',
      method: 'post',
      data: videoInfo
    })
  },
  //删除章节信息
  deleteVideoById(videoId){
    return request({
      url: '/eduService/video/'+videoId,
      method: 'delete'
    })
  },
  //删除阿里云视频
  deleteAliyunVideoById(videoId){
    return request({
      url: '/eduvod/video/removeVideo'+videoId,
      method: 'delete'
    })
  },
}
